import 'dart:ffi';

class GameEntity {
  final int id;
  final int num;
  final String title;
  final String imageUrl;
  final String description;
  final String backgroundImageUrl;

  GameEntity({
    this.id = 0,
    this.num = 0,
    this.title = '',
    this.imageUrl = '',
    this.description = '',
    this.backgroundImageUrl = '',
  });

  Map<String, dynamic> toMap() {
    return {
      'id': id,
      'num': num,
      'title': title,
      'imageUrl': imageUrl,
      'description': description,
      'backgroundImageUrl': backgroundImageUrl,
    };
  }

  static GameEntity fromMap(Map<String, dynamic> map) {
    return GameEntity(
      id: map['id'],
      num: map['num'],
      title: map['title'],
      imageUrl: map['imageUrl'],
      description: map['description'],
      backgroundImageUrl: map['backgroundImageUrl'],
    );
  }
}
